package com.spzx.channel.Contoller;

import com.spzx.channel.service.IBrandService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import com.spzx.product.api.domain.Brand;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.ServletException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * projectName: spzx-parent
 *
 * @author: 王宝贵
 * time: 2024/10/9 11:38 周三
 * description: 查询所有分类品牌 用户端
 */
@Tag(name = "查询所有分类品牌（用户端）")
@RestController
@RequestMapping("/brand")
public class BrandController extends BaseController {

    @Autowired
    IBrandService brandService;

    @Operation(summary = "查询所有品牌分类")
    @GetMapping("/getBrandAll")
    public AjaxResult selectBrandAll() throws ServletException {
        List<Brand> brands = brandService.selectBrandAll();
        return success(brands);
    }

}